package applicationFramework;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.lang.reflect.Method;
import java.util.List;

import javax.swing.JMenu;

import dynamicLoading.Repository;


public class MainFrame {
	public void deserialize(){
		try {
		      FileInputStream fichier = new FileInputStream("file.txt");
		      ObjectInputStream ois = new ObjectInputStream(fichier);
		      FileTreeFrame personne = (FileTreeFrame) ois.readObject();
		      System.out.println("Personne : ");
		     /* System.out.println("nom : "+personne.getNom());
		      System.out.println("prenom : "+personne.getPrenom());
		      System.out.println("taille : "+personne.getTaille());*/
		    } 
		    catch (java.io.IOException e) {
		      e.printStackTrace();
		    }
		    catch (ClassNotFoundException e) {
		      e.printStackTrace();
		    }
		  }
	 public static void main(String argv[]) {
		 FileTreeFrame f=new FileTreeFrame("E:/");
		    try {
		      FileOutputStream fichier = new FileOutputStream("file.txt");
		      ObjectOutputStream oos = new ObjectOutputStream(fichier);
		      oos.writeObject(f);
		      oos.flush();
		      oos.close();
		    }
		    catch (java.io.IOException e) {
		      e.printStackTrace();
		    }
		    new MainFrame().deserialize();
		    
		  }
	
	
}